package com.idbk.chargestation.util;

public enum GlobalResult {

	SYSTEM_BUSY(-2,"系统繁忙"),
	UNKNOW_SERVER_ERROR(-1,"服务器未知错误"),
	OK(0,"ok"),

	POINT_COMMENT_PRAISED(32231,"该评论已点赞"),
	
	CHARGE_FINISH_OK(34800,"充电完成"),
	CHARGE_FINISH_STOP(34122,"没有充电或充电已完成"),
	CHARGE_FINISH_NETWORK(34901,"充电完成，但是由于网络延时请到[我的钱包]查看账单详情"),
	CHARGE_FINISH(34801,"没有充电或充电已完成"),
	
	TOKEN_INVALID(40001,"不合法的token，请确认token的有效性或未超时"),
	USERNAME_OR_PASSWORD_INVALID(40002,"不合法的用户名或密码"),
	PARAMETERS_INVALID(40003,"不合法的参数"),
	URL_INVALID(40004,"不合法的URL"),

	TIMESPAN_INVALID(40101,"不合法的时间区间"),
	BEGIN_DATETIME_INVALID(40102,"不合法的起始时间"),
	END_DATETIME_INVALID(40103,"不合法的结束时间"),

	PAGE_INDEX_INVALID(40201,"不合法的起始页"),
	PAGE_COUNT_INVALID(40202,"不合法的每页数据量"),

	TOKEN_REQUIRED(41001,"缺少token"),

	GSM_TIMEOUT(42001,"短信验证超时"),
	GSM_REFUSE(42002,"短信请求间隔小于120秒"),

	OBJECT_NOT_FOUND(44001,"对象不存在"),
	INVALID_REPEAT_OPERATION(44002,"无效的重复操作"),

	FILE_SIZE_LIMIT(60101,"上传文件大小超过限制"),
	FILE_TYPE_INVALID(60102,"上传文件类型不合法"),
	UPLOAD_FAILED(60103,"上传失败");

	private int status;
	private String message;

	private GlobalResult(int status, String message){
		this.status = (status);
		this.message = (message);
	}

	public int getStatus() {
		return status;
	}

	public String getMessage() {
		return message;
	}

}

